home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / +look_here_1st!+ / reader_requests / alienbreed3d2 / cheesesauce / prot.s < prev    next >
Text File  |  1997-11-28  |  2KB  |  58 lines

  1. Protection details:
  2.  
  3. Main program is called, and asks to
  4. know how much memory is available
  5. from the system. It stores this
  6. someplace. Basically need a random
  7. number to be generated somehow.
  8.  
  9. Lots of bullshit setup routines that
  10. faff around with areas of memory and
  11. don't do anything at all really.
  12. Include lots of checksums for
  13. unimportant bits of code. BUT put in
  14. the odd instruction which decodes the
  15. cache routine also
  16.  
  17. Decode cache routine from other part
  18. of memory completely.
  19.  
  20. Set up null pointers etc for cache
  21. code, and call it. Freeze cache and
  22. erase all data again. REPLACE jump
  23. to cache which has been removed.
  24.  
  25. Bugger off somewhere faffing about and
  26. setting things up for the game.
  27. Could do whole intro sequence at this
  28. point! Generally wait for ages and do
  29. loads of things (maybe generate
  30. random number for something else to
  31. use as well) before calling 
  32. cache routine (jmp rather
  33. than jsr).
  34.  
  35. NEED TO PASS:
  36.  
  37. Erase parent jump replacing with
  38. something innocuous.
  39.  
  40. decode and move code calc routine.
  41.  
  42. Code calc routine called, returning
  43. code,row,col,table in d0-d3.
  44.  
  45. Returns to code running in cache,
  46. which stores values (encoded) in
  47. bits of memory. Calls the 'enter
  48. code' routine with row,col,table.
  49.  
  50. After code has been entered, returns
  51. to code running in cache which
  52. reloads the values from memory,
  53. decodes and compares them. If
  54. correct it sets up the hidden memory
  55. locations with the correct values
  56. derived from the random number
  57. generated above. Otherwise it just
  58. exits (jmp rather than rts).